home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-18 | 1.3 KB | 52 lines | [TEXT/PJMM] |
- {** STAIR PROGRAM **}
- {Program to layout and draw stair section }
- {Version 0.90 01/18/87 G. Langdon }
-
- {** MAIN PROGRAM ** }
- {The main program opens the window and menus and }
- {displays the configuration dialog. Once the selections }
- {are made and the OK button is clicked, the stair layout }
- { is calculated and drawn. The program then enters an }
- {event loop, until the user selects quit or the configur- }
- {ation dialog to begin again. }
-
- PROGRAM Stair_Main;
- {$I-}
-
- USES
- Stair_Globals, Stair_Program;
-
- BEGIN {main program}
- SetUpSys;
- RunDialog;
- REPEAT
- UpdateSys;
- IF GetNextEvent(everyEvent, theEvent) THEN
- CASE theEvent.what OF
- mouseDown :
- CASE FindWindow(theEvent.where, theWindow) OF
- inMenuBar :
- SelectMenu(MenuSelect(theEvent.where));
- inSysWindow :
- SystemClick(theEvent, theWindow);
- inContent :
- WindowScroll(theWindow, theEvent.where);
- inDrag :
- DragWindow(theWindow, theEvent.where, DragBnds);
- inGrow :
- WindowGrow(theWindow);
- inGoAway :
- IF TrackGoAway(theWindow, theEvent.where) THEN
- DoGoAway(theWindow);
- OTHERWISE
- ;
- END;
- keyDown :
- KeyEvent(Chr(theEvent.message MOD 256));
- updateEvt, activateEvt :
- WindowUpdate(DrawWindow);
- OTHERWISE
- ;
- END;
- UNTIL done;
- END.